var mongoose = require('mongoose')


var Schema = mongoose.Schema

mongoose.connect('mongodb://localhost:27017/test', {useNewUrlParser: true, useUnifiedTopology: true});


var userSchema = new Schema({
	ids: {
		type: String,
		required:true
	},
	shangpinlujing: {
		type: String,
		required:true
	},
	title: {
		type: String,
		required:true
	},
	created_time: {
		type: Date,
		default: Date.now
	},
	tupian: {
		type: String,
		default: '/public/img/avator-default'
	}
})

module.exports = mongoose.model('Userfavorite',userSchema)